This function checks a DWord for falling as well as rising edges.
It returns the number of edges, a DWord with the edge bits, and a boolean value if edge(s) are present.
| LGF_GetBitStates (FB) | ||||||||
|---|---|---|---|---|---|---|---|---|
| DWord | value | hasChanged | Bool | |||||
| hasRisingEdges | Bool | |||||||
| risingBits | DWord | |||||||
| noOfRisingBits | USInt | |||||||
| hasFallingEdges | Bool | |||||||
| fallingBits | DWord | |||||||
| noOfFallingBits | USInt | |||||||
| Identifier | Data type | Default value | Description |
|---|---|---|---|
| value | DWord | 16#00000000 | Check input value for changes and edges |
| Identifier | Data type | Description |
|---|---|---|
| hasChanged | Bool | Input value has changed (compared to the previous cycle) |
| hasRisingEdges | Bool | Input value has rising edges |
| risingBits | DWord | Bitstream with the rising edges |
| noOfRisingBits | USInt | Number of rising edges in the input value |
| hasFallingEdges | Bool | Input value has falling edges |
| fallingBits | DWord | Bitstream with the falling edges |
| noOfFallingBits | USInt | Number of falling edges in the input value |
| Version & Date | Change description | |
|---|---|---|
| 1.0.0 | Simatic Systems Support | |
| 2021.01.28 | First released version | |